﻿using System;
using System.Runtime.Serialization;

namespace JTLeigh.Commerce.Spencer.Core.Service.Contracts
{

	/// <summary>
	/// <see langword="abstract"/> base class for all request data contracts.
	/// </summary>
	[DataContract(Name = "RequestBase", Namespace = "http://schemas.jtleigh.com/Commerce/Spencer/Core/1.0/")]
	public abstract class RequestBase
	{

		#region Properties

		/// <summary>
		/// Gets or sets the tenant identifier that identifies the tenant making the request.
		/// </summary>
		/// <value>A tenant identifier <see cref="Guid"/>.</value>
		[DataMember(Name = "TenantId", IsRequired = true)]
		public Guid TenantId { get; set; }

		/// <summary>
		/// Gets or sets the customer identifier that should be used as the customer identifier when
		/// authorizing or logging actions.
		/// </summary>
		/// <value>A customer identifier <see cref="Guid"/>.</value>
		[DataMember(Name = "EffectiveCustomerId", IsRequired = true)]
        public Guid EffectiveCustomerId { get; set; }

		/// <summary>
		/// Gets or sets the culture identifier that should be used to control culture-specific
		/// behavior, to retrieve culture-specific resources, etc.
		/// </summary>
		/// <value>An <see cref="Int32"/> LCID.</value>
		/// <remarks>
		/// <para>
		/// This value should be set to a <see cref="System.Globalization.CultureInfo"/>'s 
		/// <see cref="System.Globalization.CultureInfo.LCID"/> value.
		/// </para>
		/// </remarks>
		[DataMember(Name = "CultureId", IsRequired = true)]
		public int CultureId { get; set; }

		/// <summary>
		/// Gets or sets the date that should be used as the current date for calculating the
		/// visibility of date-sensitive content.
		/// </summary>
		[DataMember(Name = "EffectiveDate", IsRequired = true)]
		public DateTime EffectiveDate { get; set; }

		// NOTE: Other properties to include on RequestBase:
		// 
		// - BrandId/ChannelId/MinisiteId
		// - ShowRegardlessOfApproval
		// - etc

		#endregion // Properties

	}

}
